package com.jianbo.proxy.util;

import java.util.LinkedHashMap;
import java.util.Map;

public class ArrayUtil {
    
    public static Map<String, String> toMap(String[][] param) {
        int size = param.length;
        Map<String, String> map = new LinkedHashMap<String, String>(size);
        for(int i = 0; i < param.length; i++) {
            String key = param[i][0];
            String value = param[i][1];
            map.put(key, value);
        }
        return map;
    }

    public static <T> boolean isEmpty(T[] array) {
        return array == null || array.length == 0;
    }
}
